package com.gxa.service.impl;

import com.gxa.mapper.DutyMapper;
import com.gxa.pojo.Duty;
import com.gxa.service.DutyService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class DutyServiceImpl implements DutyService {
    @Resource
    DutyMapper dutyMapper;

    @Override
    public List<Duty> findDutyByPage(Integer page, Integer size) {
        return dutyMapper.findDutyByPage(page,size);
    }

    @Override
    public List<Duty> findAll() {
        return dutyMapper.findAll();
    }

    @Override
    public Integer findAllDuty() {
        return dutyMapper.findAllDuty();
    }

    @Override
    public Integer insertDuty(Map map) {
        return dutyMapper.insertDuty(map);
    }

    @Override
    public Integer updateDutyById(Map map) {
        return dutyMapper.updateDutyById(map);
    }

    @Override
    public Integer updateDutyState(Map map) {
        return dutyMapper.updateDutyState(map);
    }

    @Override
    public Integer deleteDutyById(Integer id) {
        return dutyMapper.deleteDutyById(id);
    }

    @Override
    public String findDutyByName(String name) {
        return dutyMapper.findDutyByName(name);
    }
}